var crypto = require('crypto');
console.log(crypto.getHashes()); // 打印支持的hash算法
var str = 'huangzz';

var hash = crypto.createHmac('sha256',str)
                 .update('I love zz')
                 .digest('hex');

                 console.log(hash);